package com.sinai.mshab.client.services;

import java.util.ArrayList;
import java.util.HashMap;

import com.google.gwt.user.client.rpc.RemoteService;
import com.sinai.mshab.client.util.AnswerCollection;
import com.sinai.mshab.client.util.User;
import com.sinai.mshab.client.ui.Key;

/**
 * This interface defines the MSHAB operations between client and server.
 * 
 * @author serge
 * 
 */
public interface Service extends RemoteService {
	public void sendAnswer(AnswerCollection a, Key key);

	public HashMap retrieveData(Key key);

	public User validateLogin(String user, String pass);

	public void resetPassword(String username);

	public ArrayList getTables();

	public HashMap getColumnNames();

	public ArrayList execteSQL(String sql, int start, int end);

	public boolean validKey(Key k);

	public ArrayList getSuggestions(String fieldName, String tableName,
			String typed_so_far);

	public String getUserPermission(String username);

	public boolean authenticate(String username, String password);

	public boolean storeFile(String fieldName, String tableName, Key dbKey,
			String filePath);
}
